package tools.structure;

import javax.swing.table.DefaultTableModel;

import tools.ihm.Msg;

/**
 * Same table model for all
 * */
public class ChatTableModel extends DefaultTableModel{
	
	private static final long serialVersionUID = 1L;

	public ChatTableModel(Object[][] columnsDatas, String[] columnsTitles) {
		super(columnsDatas, columnsTitles);
	}

	public void removeAllRows(){
		if (getRowCount()>0){
			for (int i = getRowCount()-1; i >= 0; i--) {
				removeRow(i);
			}
			//removeRow(0);
		}else{
			Msg.toDevelopper("Warning : Tentative de suppression de lignes sur un modèles de tables vides (SWING)");
		}
	}	
	
	public boolean isCellEditable(int a, int b){
		return false;
	}
}
